home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / game / patch / ClickStart.lha / ClickStart < prev   
Encoding:
Text File  |  1999-08-04  |  5.8 KB  |  170 lines

  1. ;$VER:  ClickStart Version 1.0 Rev 3.942 By  Nils-Erik Reklev Skilnand 19.4.97 - aMIGA rULEZ! 
  2. UnsetENV ExWB
  3.  
  4. If NOT EXISTS ReqBootFile
  5.            RequestFile >ReqBootFile TITLE "Which file should I Execute?"
  6.         Copy ReqBootFile ENV:
  7.         List $ReqBootFile >ENV:Fsize LFormat="%L"
  8.         List $ReqBootFile >ENV:Name LFormat="%N"
  9.         If $Fsize EQ Empty
  10.                 Delete >NIL: ReqBootFile
  11.                 Echo "Leaving The Script..."
  12.                 Quit
  13. Else
  14.                 If $Name EQ "ReqBootFile"
  15.                         Delete >NIL: ReqBootFile
  16.                         Echo "Leaving The Script..."
  17.                         Quit
  18.                 Else
  19. EndIf   
  20.         EndIf
  21.  
  22.         mount >NIL: Pipe:
  23.  
  24.         Run type $ReqBootfile hex >pipe:e
  25.         Break `Status Com=Type` c >NIL:
  26.         Echo "Please Wait While Checking File Type........"
  27.         Search From Pipe:e pattern "0000: 000003F3" quick >NIL: 
  28.  
  29.         If Warn 
  30.                 Requestchoice >ENV:ReqAttrib "FileType Not EXE" "The File '$Name' Is Not Executable *nIs It A Script??" "Yes|No"
  31.                 If $ReqAttrib EQ 0
  32.                         Delete >NIL: ReqBootFile
  33.                         Echo "Leaving the Script"
  34.                         Quit
  35.                 Else
  36.                 EndIf
  37.  
  38.                 If $ReqAttrib EQ 1
  39.                                     Echo "*ecWorking..."
  40.                                     Rename $Name $Name.bak
  41.                                     Echo >RenamedFile ";this script will recover the backupfile and remove the ClickStart"
  42.                                     Echo >>RenamedFile "Delete ClickStart*nDelete ClickStart.info*nDelete all BootFiles*nDelete all devs*nDelete ReqBootFile*nRename $Name.bak $Name*nDelete RenamedFile#?*nDelete BootFiles/ExWB*nDelete MemSize"
  43.                                     Copy BootFiles/RenamedFile.info `Cd`
  44.                                     
  45.                                     Echo >Addfile "If NOT Exists Bootfiles/ExWB"
  46.                                     Echo >>Addfile "Echo >Bootfiles/ExWB NO!!!"
  47.                                     Echo >>Addfile "Else*nEndIf"
  48.                                     Join Addfile $Name.bak as File
  49.                                     Echo >>File "*nCopy Bootfiles/ExWB ENV:*nIf $ExWB EQ NO!!!*n Echo >Bootfiles/ExWB Yes!!!*nElse*nEndIf"
  50.                                     Delete ReqBootfile >NIL: 
  51.                                     Delete Addfile >NIL:
  52.                                     Rename File ReqBootFile
  53.                         
  54.                 Else
  55.                 EndIf
  56.         Else
  57.                 Search From ENV:Name SEARCH .library >NIL:
  58.                 If Warn
  59.                 Else
  60.                         Delete >NIL: ReqBootFile
  61.                 Echo "File Is A Library"
  62.                         Echo "Leaving the Script"
  63.                 Quit
  64.                 EndIf
  65.  
  66.                 Search From ENV:Name SEARCH .device >NIL:
  67.                 If Warn
  68.                 Else
  69.                         Delete >NIL: ReqBootFile
  70.                 Echo "File Is A Device"
  71.                 Echo "Leaving the Script"
  72.                         Quit
  73.                 EndIf
  74.  
  75.                 Requestchoice >ENV:ReqAttrib "FileType EXE" "The File '$Name' Is Executable *nIs It The Main File???" "Yes|No"
  76.                 If $ReqAttrib EQ 1
  77.                 Echo "*ecWorking..."
  78.                 Echo >UnInstall ";Do I need to say enything...*nDelete ClickStart*nDelete ClickStart.info*nDelete all BootFiles*nDelete all devs*nDelete Reqbootfile*nDelete Memsize*nDelete Bootfiles/exwb*nDelete UnInstall#?"
  79.                 Copy Bootfiles/Renamedfile.info `Cd`
  80.         Rename Renamedfile.info UnInstall.info
  81.                 Echo >Addfile "If NOT Exists Bootfiles/ExWB"
  82.                          Echo >>Addfile "Echo >Bootfiles/ExWB NO!!!"
  83.                          Echo >>Addfile "Else*nEndIf"
  84.                          Join Addfile ReqBootFile as file
  85.                          Echo >>File "*nCopy Bootfiles/ExWB ENV:*nIf $ExWB EQ NO!!!*n Echo >Bootfiles/ExWB Yes!!!*nElse*nEndIf"
  86.                          Delete ReqBootfile >NIL:
  87.                          Delete Addfile >NIL:
  88.                          Rename File ReqBootFile
  89.                          Else
  90.                 EndIf   
  91.  
  92.                 If $ReqAttrib EQ 0
  93.                         Delete >NIL: ReqBootFile
  94.                         Echo "Leaving the Script"
  95.                         Quit
  96.                 Else
  97.                 EndIf   
  98.         EndIf
  99. Else
  100. EndIf
  101.  
  102. Delete >NIL: ENV:Name
  103. Delete >NIL: ENV:Fsize
  104.  
  105. If NOT EXISTS MemSize
  106.  
  107.         Requestchoice >ENV:ReqMem "Memory" "Select the minimum amount of Chip memory *nThat your Program Require" "1200KB|1400KB|1600KB|1800KB|Other"
  108.  
  109.         If $ReqMem EQ 1
  110.                 Echo >MemSize 1200000
  111.         Else
  112.         EndIf
  113.  
  114.         If $ReqMem EQ 2
  115.                 Echo >MemSize 1400000
  116.         Else
  117.         EndIf
  118.  
  119.         If $ReqMem EQ 3
  120.                 Echo >MemSize 1600000
  121.         Else
  122.         EndIf
  123.  
  124.         If $ReqMem EQ 4
  125.                 Echo >MemSize 1800000
  126.         Else
  127.         EndIf
  128.  
  129.         If $ReqMem EQ 0
  130.                 Ed MemSize
  131.         Else
  132.         EndIf
  133. Else
  134. EndIf
  135.  
  136. copy MemSize Env:
  137. If Exists Bootfiles/ExWB
  138.         Copy Bootfiles/ExWB Env:
  139. Else
  140.         Set ExWB "I Don't Now"
  141. EndIf
  142.  
  143. avail chip >env:Chip
  144.  
  145. If $Chip GE $MemSize VAL
  146.         Skip Yes
  147. Else
  148.         requestchoice >env:choice "Smart Script By Smurf" "You Don`t have enought Chipmemory Required *nTherefore you have to *nRestart your computer *nProcessor Required = 020+" "Restart|Cancel"
  149.         If $choice EQ 1
  150.         Execute BootFiles/RebootStart
  151. Endcli
  152. Endif
  153.  
  154. Quit
  155.  
  156. Lab Yes
  157.  
  158. Requestchoice >env:choice "Smart Script By Smurf" "Exits back to WB = $ExWB*nProcessor Required = 020+ *nMemory Required =$MemSize Bytes " "Run It|Reboot Anyway|Cancel"
  159.  
  160. If $choice EQ 2
  161.      Execute BootFiles/RebootStart
  162. Else
  163. Endif
  164.  
  165. If $choice EQ 1
  166.         Execute ReqBootFile
  167. Else
  168. EndCli
  169. EndIf   
  170.